struct ListNode* swapPairs(struct ListNode* head) {
      struct ListNode* newhead = (struct ListNode*)malloc(sizeof(struct ListNode));
    newhead->next = head;
    struct ListNode* current = newhead;
    struct ListNode* tem;
    struct ListNode* tem1;
    while(current->next!=NULL && current->next->next!=NULL)
    {tem=current->next;
     tem1=current->next->next->next;
    current->next=current->next->next;
    current->next->next=tem;
    tem->next=tem1;
    current=current->next->next;}
    return newhead->next;
}